<?php
include_once 'lib/htmlTag.php';
class Paragraph extends htmlTag{
	/**
	 * 
	 * Shortcut for a HTML paragraph (<p>) element
	 * @param $content
	 * @param $id
	 * @param $atrib
	 */
	public function __construct($content = '',$id = null, $atrib = null){
		parent::__construct('p',$content,null, $atrib);
	
		if(is_null($id)){
			$id = 'paragraph'.htmlTag::$nrTags;
		}
		$this->id=$id;
	}
	public function toHtml(){
		return parent::toHtml(true,false);
	}
}

class Header extends htmlTag{
	/**
	 * 
	 * Shortcut for a HTML header(<H..>) element
	 * @param $size = 1-6
	 * @param $content
	 * @param $id
	 * @param $atrib
	 */
	public function __construct($size = 1,$content = '', $id=null, $atrib = null){
		if($size>6) $size=6;
		else if($size<1) $size = 1;
		parent::__construct('h'.$size,$content,null,$atrib);
		
		if(is_null($id)) $id = 'header'.htmlTag::$nrTags;
		$this->id = $id;
	}
}